<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新增分类</title>
    <style>
        body {
            font-family: "Arial", sans-serif;
            margin: 0;
            padding: 0;
            background: url('background.jpg') no-repeat center center fixed;
            background-size: cover;
            color: #fff;
        }

        .container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        .card {
            width: 600px;
            display: flex;
            flex-direction: row;
            background: rgba(0, 0, 0, 0.7);
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
            overflow: hidden;
        }

        .card-left {
            flex: 1;
            background: #ff6f61;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #fff;
            font-size: 20px;
            font-weight: bold;
            text-align: center;
            padding: 20px;
        }

        .card-right {
            flex: 2;
            padding: 30px;
        }

        h1 {
            text-align: center;
            color: #ff6f61;
            margin-bottom: 20px;
        }

        label {
            display: block;
            font-weight: bold;
            margin-bottom: 5px;
            color: #ddd;
        }

        input[type="text"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border: 1px solid #ced4da;
            border-radius: 5px;
            font-size: 16px;
            color: #495057;
        }

        input[type="text"]:focus {
            border-color: #ff6f61;
            outline: none;
            box-shadow: 0 0 5px rgba(255, 111, 97, 0.5);
        }

        .actions {
            text-align: center;
            margin-top: 20px;
        }

        button {
            background-color: #ff6f61;
            color: #ffffff;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
            margin: 0 10px;
        }

        button:hover {
            background-color: #ff5a4d;
        }

        a {
            text-decoration: none;
            color: #ff6f61;
            font-size: 14px;
        }

        a:hover {
            color: #ff5a4d;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="card">
        <div class="card-left">
            新增分类
        </div>
        <div class="card-right">
            <h1>分类信息</h1>
            <form method="post" action="CategoryServlet">
                <input type="hidden" name="action" value="add" />
                <label for="name">分类名称：</label>
                <input type="text" id="name" name="name" placeholder="请输入分类名称" required />
                <div class="actions">
                    <button type="submit">保存</button>
                    <a href="CategoryServlet">返回</a>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
